package com.gali.edu.controller;

import com.gali.edu.pojo.Category;
import com.gali.edu.service.impl.CategoryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class CategoryController {
    @Autowired
    private CategoryServiceImpl categoryService;
    @ResponseBody
    @GetMapping("/show")
    public List<Category> showAll(){
        return categoryService.findAll();
    }
}

